let str = 'aabbbbbcccc'

function handle(str) {
    let map = new Map()
    let resSet = new Set()
    for(let item of str) {
        map.set(item, (map.get(item) || 0) + 1)
    }

    for(let [key, value] of map) {
        if (resSet.has(value)) {
            return false
        } 
        resSet.add(value)
    }

    return true
}

let res = handle(str) 
console.log(res)